/* MenuSearch */

.layadmin-menusearch-input {
  display: inline-block;
  width: 180px;
  height: 30px;
  border: none;
  cursor: pointer;

  &::-webkit-input-placeholder {
    color: inherit;
    opacity: .54
  }
}

.layadmin-menusearch {
  @extend %dropdown-menu;
  // top: 50px !important;
  // padding: 0 !important;
  // display: none;
  // position: absolute;
  right: 0;
  top: $header-height + 5;
  z-index: 1;
  width: 380px;
  // min-width: 100%;
  max-height: 320px;
  // padding: 5px 0;
  // border-radius: 2px;
  // border: 1px solid #d2d2d2;
  // background-color: $color-white;
  overflow-x: hidden;
  overflow-y: auto;

  // .layadmin-menusearch-btn {
  //   cursor: pointer;
  //   &:hover {
  //     opacity: .8;
  //   }

  //   &:active {
  //     opacity: 1;
  //   }
  // }

  .layadmin-menusearch-footer {
    box-shadow: 0 -5px 12px 0 rgba($color-black, .05);

    .layui-card-header {
      padding-right: 10px;
      @include clearfix;

      .layadmin-menusearch-btn {
        float: right;
        padding-right: 0 !important;
        color: $color-primary-100 !important;

        &:hover {
          background-color: transparent !important;
        }
      }
    }

    .layui-card-body {
      .layadmin-menusearch-btn {
        position: static !important;
        margin: 0;

        span {
          font-size: 12px;
          margin-right: 4px;
        }

        i.layui-icon {
          font-size: 12px !important;
        }
      }
    }
  }

  .layadmin-menusearch-item {
    // height: 36px;
    // line-height: 36px;
    padding: 10px 20px;
    border-bottom: 1px solid #e6e6e6;
    // @include clearfix;

    &:last-child {
      border-bottom-color: transparent;
    }

    &:hover {
      background-color: $color-gray-f200;
    }

    &.layadmin-menusearch-tip {
      line-height: 30px;
      color: $color-gray-900;
      cursor: pointer;
    }

    .layadmin-menusearch-item--title {
      // float: left;
      // max-width: 20%;
      display: block;
      line-height: 28px;
      color: $text-color;
      font-style: normal;
      @include ellipsis;
    }

    .layadmin-menusearch-item--detail {
      // float: right;
      // max-width: 75%;
      line-height: 14px;
      font-size: 12px;
      color: $color-gray-900;
      @include ellipsis;
    }

    strong {
      font-weight: 400;
      font-size: inherit;
      color: $color-primary;
    }
  }

  .layadmin-menusearch-item.layadmin-this {
    background-color: $color-primary;
    color: $color-white;

    strong {
      background-color: $color-white;
      border-radius: 2px;
    }

    .layadmin-menusearch-item--title,
    .layadmin-menusearch-item--detail {
      color: inherit !important;
    }
  }

  .layadmin-menusearch-nodata {
    color: $color-gray-900;
    text-align: center;
  }
}
